/*    */ package com.zimbra.cs.filter;
/*    */ 
/*    */ import com.zimbra.common.localconfig.KnownKey;
/*    */ import com.zimbra.common.localconfig.LC;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.common.soap.Element.ElementFactory;
/*    */ import com.zimbra.common.util.Log;
/*    */ import com.zimbra.common.util.ZimbraLog;
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import java.util.List;
/*    */ import org.apache.jsieve.parser.generated.Node;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ class RuleRewriterFactory
/*    */ {
/* 32 */   private static RuleRewriterFactory instance = null;
/*    */   
/*    */   static synchronized RuleRewriterFactory getInstance() {
/* 35 */     if (instance == null) {
/* 36 */       String className = LC.zimbra_class_rulerewriterfactory.value();
/* 37 */       if ((className != null) && (!className.equals(""))) {
/*    */         try {
/* 39 */           instance = (RuleRewriterFactory)Class.forName(className).newInstance();
/*    */         } catch (Exception e) {
/* 41 */           ZimbraLog.filter.error("could not instantiate RuleRewriterFactory interface of class '" + className + "'; defaulting to RuleRewriterFactory", e);
/*    */         }
/*    */       }
/* 44 */       if (instance == null)
/* 45 */         instance = new RuleRewriterFactory();
/*    */     }
/* 47 */     return instance;
/*    */   }
/*    */   
/*    */   RuleRewriter createRuleRewriter() {
/* 51 */     return new RuleRewriter();
/*    */   }
/*    */   
/*    */   RuleRewriter createRuleRewriter(Element.ElementFactory factory, Node node, List<String> ruleNames) {
/* 55 */     RuleRewriter rrw = createRuleRewriter();
/* 56 */     rrw.initialize(factory, node, ruleNames);
/* 57 */     return rrw;
/*    */   }
/*    */   
/*    */   RuleRewriter createRuleRewriter(Element eltRules, Mailbox mbox) {
/* 61 */     RuleRewriter rrw = createRuleRewriter();
/* 62 */     rrw.initialize(eltRules, mbox);
/* 63 */     return rrw;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/RuleRewriterFactory.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */